package com.backwaveweibo.bww.utils;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author GHW : RD-Kelsey
 * @description 统一API响应结果封装
 * @date 2020/6/8
 * <p>
 * code : 状态码 调用ResultCode枚举类
 * message : 信息
 * data : 数据实体
 */

@Data
@Accessors(chain = true)
public class Result {

    private int code;
    private String message;
    private Object data;

    public Result setCode(ResultCode resultCode) {
        this.code = resultCode.code;
        return this;
    }
}
